package com.dc.server.controller;

import com.dc.server.pay.Context;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @Auther: 赵聪
 * @Date: 2018/8/25 10:06
 * @Description:
 */
@RestController
public class PayController {

    @RequestMapping("/paycoe")
    public String pay(String code) {
        Context context = new Context();
        BigDecimal bigDecimal = context.strategyPayInterface(code, 5);
        System.out.println("======================" + bigDecimal);
        return "成功";
    }
}
